# gen.py
import random
import sys
import io

# 设置中文输出编码
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')

def generate_test_cases(num_cases=5, min_len=3, max_len=10, min_val=0, max_val=20):
    test_cases = []
    for _ in range(num_cases):
        length = random.randint(min_len, max_len)
        nums = [random.randint(min_val, max_val) for _ in range(length)]
        test_cases.append(nums)
    return test_cases

if __name__ == "__main__":
    cases = generate_test_cases()
    for i, case in enumerate(cases, 1):
        print(f"测试用例 {i}：{case}")
